<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>点击空白处隐藏</title>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>

<input type='text' value="点击显示DIV" class="button" />
<div class="demo" style="display:none;"><a href="http://www.baidu.com/">123456</a><br /><a href="http://www.qq.com/">QQ</a></div>

<script>
$(document).ready(function(){
  $(document).click(function(){
    $(".demo").hide();
  });  
  $(".button").click(function(e){
    $(".demo").show();
    e.stopPropagation();
  });
  $(".demo").click(function(e){
    e.stopPropagation();
  });
})
</script>
</body>
</html>